<?php
class Zendvn_Validate_PassConfirm extends Zend_Validate_Abstract{

	const PASS_NOT_EQUAL  = 'passNotEqual';
    
    protected $_messageTemplates = array(
        self::PASS_NOT_EQUAL   => "Password va password confirm khong bang nhau",        
    );
    
    private $_confirm;
	
    public function __construct($confirm = null){
    	$this->_confirm = $confirm;
    }
	
	public function isValid($value){
		
		if($value !== $this->_confirm){
			$this->_error(self::PASS_NOT_EQUAL);
			return false;
		}
		return true;
	}
}